package com.xgq.drink.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import lombok.Data;
/**
 * <p>
 * 订单表
 * </p>
 *
 * @author xgq
 * @since 2025-03-03
 */
@Data
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单ID
     */
    @TableId(value = "order_id", type = IdType.AUTO)
    private Long orderId;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 订单总金额
     */
    private BigDecimal totalAmount;

    /**
     * 订单状态  1: 待付款, 2: 待发货, 3: 待收货, 4: 待评价, 5: 退款/售后, 6: 订单取消7: 已退款 8: 已完成 9.纠纷
     */
    private Integer status;

    /**
     * 支付方式
     */
    private String paymentMethod;

    /**
     * 收货地址
     */
    private Long address;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    private LocalDateTime updatedAt;

    /**
     * 实付金额
     */
    private BigDecimal payAmount;

    /**
     * 优惠信息
     */
    private Integer discount;
    /**
     * 商品数量
     */
    private Integer productNum;
    private Long storeId;
    @TableField(exist = false)
    private List<OrderProduct> orderProducts;
    @TableField(exist = false)
    private Address addressInfo;

}
